C_PREREQ(2.59)

AC_INIT([encdb], [1.9], [aldleonm@gmail.org])
AM_INIT_AUTOMAKE([subdir-objects dist-bzip2])
AC_CONFIG_SRCDIR([src/encdb.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])

AC_CONFIG_MACRO_DIR([m4])

AC_PROG_CC
AC_PROG_INSTALL
AC_LANG([C])
AM_PROG_CC_C_O

AC_CHECK_FUNCS([memchr memmove memset strdup strerror])
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h db.h openssl/evp.h openssl/md5.h])
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AX_PATH_BDB([4],[
 LIBS="$BDB_LIBS $LIBS"
 LDFLAGS="$BDB_LDFLAGS $LDFLAGS"
 CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS"
])
AX_CHECK_OPENSSL

AC_OUTPUT
